var shop_details = new Vue({
    el: "#shopDetails",
    data: {
        furnitureId:furnitureId,
        number:1    //选择的商品数量
    },
    methods: {
        // 添加购物车
        addToCart(){
            axios.get(PATH+"/car/add?furnitureId="+this.furnitureId+"&number="+this.number)
                .then((resp)=> {
                    resp = resp.data
                    if(resp.code==='B0001'){
                        alert("添加失败")
                    }else if(resp.code==='00000'){
                        layer.msg("添加成功")
                        location.reload()
                    }
                })
        },
        // 购物车--
        minus(){
            this.number--;
        },
        // 购物车++
        add(){
            this.number++;
        }
    }
})
